package com.ghy.dto;

import com.ghy.constant.RE;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;


import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
/**
 * @author GaoHeYang
 */
@Schema(name="横幅添加DTO")
@Data
public class BannerInsertDTO implements Serializable, RE {

    @Pattern(regexp = INFO_RE, message = INFO_RE_MSG)
    @Schema(description = "描述内容")
    private String info;

    @NotNull(message="序号不能为空")
    @Range(min = 0,message="序号最小为θ")
    @Schema(description = "通知序号")
    private Long idx;

}
